import request from "@/utils/request";

//查询成绩列表 【{courseName ,score}】List
export function getStudentScore(studentId,data) {
  return request({
    url: '/student/getStudentScore/' + studentId,
    method: 'get',
    params:data
  })
}
// post /teach/rateTeach/student_Id/teach_id/score
//学生对老师评价
export function rateTeach(studentId,teachId,score) {
  return request({
    url: '/teach/rateTeach/'+studentId + '/' +teachId + '/' + score,
    method: 'post'
  })
}


// get /course/getAllBySelect/studentId
// {[courseId,courseName, teacherName,des] list }    获取学生已选择的课程
export function getAllBySelect(studentId,data) {
  return request({
    url: '/course/getAllBySelect/' + studentId,
    method: 'get',
    params:data
  })
}

export function getRecommCourse(studentId,data) {
  return request({
    url: '/course/getRecommCourse/' + studentId,
    method: 'get',
    params:data
  })
}

export function hobbyType() {
  return request({
    url: '/course/hobbyType',
    method: 'get',
  })
}
export function getStudentExp() {
  return request({
    url: '/course/studyExperienceType',
    method: 'get',
  })
}
export function studyExperience() {
  return request({
    url: '/course/studyExperience',
    method: 'get',
  })
}
// post /course/selectCourse  (courseId,studentId) 学生选课
export function selectCourse(item) {
  return request({
    url: '/course/selectCourse',
    method: 'post',
    data: item
  })
}

// get /course/getAllBySelected  null  获取学生未选择的课程
// {[courseId,courseName, teacherName] list}
export function getAllBySelected(studentId,data) {
  return request({
    url: '/course/getAllBySelected/' + studentId,
    method: 'get',
    params:data
  })
}


// post /course/dropCourse  (courseId,studentId) 学生退课
export function dropCourse(item) {
  return request({
    url: '/course/dropCourse',
    method: 'post',
    data: item
  })
}
// 二级菜单 课程推荐
// hobby   study_experience
// 后续再写


// >get /course/getAllBySelect  studentId
// >{[courseId,courseName, teacherName] list
// 获取学生所有未选择的课程，改接口已经有了，直接调用。



export function getTeacherRate(teachId,studentId) {
  return request({
    url: '/teacher/getTeacherRate/'+ teachId+'/'+studentId,
    method: 'get',
  })
}
